/**
 * 初始化用户详情对话框
 */
var fixedInfoDlg = {
};
/**
 * 关闭此对话框
 */
fixedInfoDlg.close = function () {
    parent.layer.close(window.parent.WzUser.layerIndex);
}

var status=$("#status").val();
var userCode=$("#userCode").val();
var idCard=$("#idCard").val();
fixedInfoDlg.Success=function () {
    var role=$("#role").val();
    var ajax = new $ax(Feng.ctxPath + "/wzUser/authentication", function(data){
        if(data.code==100){
            Feng.error(data.message);
            return false;
        }
        if(data.code==200) {
            Feng.success(data.message);
            window.parent.WzUser.table.refresh();
            fixedInfoDlg.close();
        }
    },function(data){
        Feng.error("操作失败!" + data.responseJSON.message + "!");
    });
    ajax.set("userCode",userCode);
    ajax.set("role",role);
    ajax.set("status",status);
    ajax.set("idCard",idCard);
    ajax.set("success","success");
    ajax.start();
    var ajax = new $ax(Feng.ctxPath + "/wzUser/wzCheckRecord", function(data){
    },function(data){
    });
    ajax.set("userCode",userCode);
    ajax.set("role",role);
    ajax.set("status",status);
    ajax.set("success","success");
    ajax.start();
};

fixedInfoDlg.Fail=function () {
    var role = $("#role").val();
    var ajax = new $ax(Feng.ctxPath + "/wzUser/authentication", function (data) {
        Feng.success("操作成功!");
        window.parent.WzUser.table.refresh();
        fixedInfoDlg.close();
    }, function (data) {
        Feng.error("修改失败!" + data.responseJSON.message + "!");
    });
    ajax.set("userCode", userCode);
    ajax.set("role", role);
    ajax.set("status",status);
    ajax.set("success", "fail");
    ajax.start();
    var ajax = new $ax(Feng.ctxPath + "/wzUser/wzCheckRecord", function (data) {
    }, function (data) {
    });
    ajax.set("userCode", userCode);
    ajax.set("role", role);
    ajax.set("status",status);
    ajax.set("success", "fail");
    ajax.start();
}